using System.Collections;
using System.Collections.Generic;

namespace MySpreadsheet
{
    public class WorkBook
    {
        private List<WorkSheet> workSheets = new List<WorkSheet>();

        public WorkBook(string name)
        {
            Name = name;
        }

        public string Name { get; set; }

        public IEnumerable<WorkSheet> WorkSheets
        {
            get { return workSheets; }
        }

        public WorkSheet AddWorkSheet(string sheetName)
        {
            var workSheet = new WorkSheet(sheetName);
            workSheets.Add(workSheet);

            return workSheet;
        }
    }
}